package com.lsc.Controller;

import com.lsc.entity.User;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @program: springboot-swagger
 * @description:
 * @author: 上河图
 * @create: 2020-10-19 18:31
 */
@Api(tags = "hello控制类")  //给类加注释  这个是用于Controller层的
@RestController
public class helloController {

    @ApiOperation("查找")  //给每个方法添加注释
    //@ApiParam() 这个是用于参数的注释
    @PostMapping("/a2")
    public User test2( User user){

        System.out.println(user);
        return user;
    }
}